﻿Imports System.Data

Partial Class WebForm_CommonControl_VolunteerQueryControlV2
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Me.LoadOnStartUp = True Then
                Me.InitData()
            End If
        End If
    End Sub




    Public Sub InitData()


        txtVolunteerId.Text = String.Empty
        txtVolunteerName.Text = String.Empty
        txtTEL.Text = String.Empty


    End Sub





 



    Sub Show_mpSearch()
        If mpSearchUniqueID <> String.Empty Then
            Dim mpSearch As AjaxControlToolkit.ModalPopupExtender = Page.FindControl(mpSearchUniqueID)
            If mpSearch IsNot Nothing Then
                mpSearch.Show()
            End If
        End If
    End Sub

    Public Sub Display_EcolifeID(ByVal Display As Boolean)
        Me.PlaceHolder2.Visible = Display
    End Sub

  
End Class

Partial Class WebForm_CommonControl_VolunteerQueryControlV2

   

    Public ReadOnly Property VolunteerId() As String
        Get
            Return txtVolunteerId.Text.Replace("'", "''").Trim()
        End Get

    End Property

    Public ReadOnly Property EcolifeID() As String
        Get
            Return txtEcolifeID.Text.Replace("'", "''").Trim()
        End Get

    End Property

    Public ReadOnly Property VolunteerName() As String
        Get
            Return txtVolunteerName.Text.Replace("'", "''").Trim()
        End Get

    End Property

    Public ReadOnly Property VolunteerTEL() As String
        Get
            Return txtTEL.Text.Replace("'", "''").Trim()
        End Get

    End Property

    Public Property mpSearchUniqueID() As String
        Get
            Return ViewState("MpSearchUniqueID")
        End Get
        Set(ByVal value As String)
            ViewState("MpSearchUniqueID") = value
        End Set

    End Property

    Public Property LoadOnStartUp() As Boolean
        Get
            If ViewState("LoadOnStartUp") Is Nothing Then
                Return False
            End If

            Return ViewState("LoadOnStartUp")
        End Get
        Set(ByVal value As Boolean)
            ViewState("LoadOnStartUp") = value
        End Set
    End Property

 
End Class